import request from '@/utils/request'

// 验证身份-获取验证码
export function removeBinding (phone) {
  return request({
    url: '/unicornDeclare/register/removeBinding',
    method: 'get',
    headers: { isToken: false },
    params: { phone }
  })
}

// 忘记密码 获取验证码
export function forgetPwdgetCode(phone) {
  return request({
    url: '/unicornDeclare/register/forgetPassword',
    method: 'get',
    headers: { isToken: false },
    params: { phone }
  })
}

// 修改密码
// { phonenumber, code, password }

export function updatePassword(data) {

  return request({
    url: '/unicornDeclare/register/updateUserPassword',
    method: 'post',
    headers: { isToken: false },
    data
  })
}

// 验证身份-确认验证码
export function removeBindingPhone (data) {
  return request({
    url: '/unicornDeclare/register/removeBindingPhone',
    method: 'post',
    headers: { isToken: false },
    data
  })
}

// 修改手机号-获取验证码
export function bindingPhone (phone) {
  return request({
    url: '/unicornDeclare/register/bindingPhone',
    method: 'get',
    headers: { isToken: false },
    params: { phone }
  })
}

// 修改手机号-确认验证码
export function updateUserPhone (data) {
  return request({
    url: '/unicornDeclare/register/updateUserPhone',
    method: 'post',
    headers: { isToken: false },
    data
  })
}
